chore: only show the "Open in Stackblitz" button when there are no actual templates defined#349
Conversation
commit: |
| const noDefaultTemplate = args.template === false; | ||
|
|
||
| if (!noDefaultTemplate) { | ||
| if (!noDefaultTemplate && templates.length === 0) { |
There was a problem hiding this comment.
I think it should be an && because we want the default template to be created only when both conditions are true?
if no templates were found and if the user hasn't explicitly disabled templates.
if you think about using ||, I think it might be incorrect because if noDefaultTemplate is true, we should not create the default template, even if no templates were found. or if the user uses, as an example, --template ./examples/* and templates are found, we should not create the default template. unless I'm missing something here...
|
please mention in each of the relevant slack threads that this issue was fixed. same with other issues. and i think there are more issues in slack that need to be tackled. |
With these changes, the button will always be shown when there are no actual templates. The only time the button is hidden is when there are actual templates.